var express = require('express');

// 图片上传
const multer = require("multer");
const { path } = require('../../util/path.config');
const upload = multer({dest:"public/uploads/picture/"})

var router = express.Router();

router.post("/picture",upload.single("file"),(req,res)=>{
    const filePath = path + `/uploads/picture/${req.file.filename}`
    res.send({
        file:filePath
    })
})

module.exports = router
